<%-- 
    Document   : posting
    Created on : 24.04.2009, 14:03:16
    Author     : Вадим
--%>

<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Сообщение</title>
        <link rel="stylesheet" href="css/my.css" type="text/css">
        <script type="text/javascript" src="js/nicetitle.js"></script>
        <!--<script type="text/javascript" src="js/tinymce/tiny_mce_gzip.js"></script>

        <script type="text/javascript">
        tinyMCE_GZ.init({
            themes : 'simple',
            languages : 'en',
            disk_cache : true,
            debug : false
        });
        </script>


        <script type="text/javascript">
        tinyMCE.init({
            mode : "textareas",
            theme : "simple"
        });
        </script>-->
    </head>
    <body>
        <c:import url="header.jsp"></c:import>
        <center><h2>Сообщение</h2>
        <c:if test="${!empty message}" >
        <table border="2">
            <tr class="up"><td>Id</td><td>Текст</td><td>Имя пользователя</td><td>Время создания</td></tr>
            <tr class="main">
                <td><c:out value="${requestScope.message.ID}" /></td>
                <td><c:out value="${requestScope.message.text}" /></td>
                <td><a
                href="ViewProfile.perform?id=<c:out value="${requestScope.message.user.ID}" />">
                <c:out value="${requestScope.message.user.login}" /></a></td>
                <td><c:out value="${requestScope.message.time}" /></td>
            </tr>
        </table>
        </c:if>

        <c:if test="${!empty user}" >
            <c:choose>
                <c:when test="${!empty message}">
                    <form action="Post.perform?id=${requestScope.message.ID}" method="post">
                        Сообщение 
                </c:when>
                <c:otherwise>
                    <form action="Post.perform" method="post">
                </c:otherwise>
            </c:choose>
            <br><br><textarea name="message" rows="10" cols="35">Ваше сообщение</textarea><br>
            <input type="submit" value="Отправить"><br>
            </form>
        </c:if>
        </center>
    </body>
</html>
